package shop.dao.impl;

import shop.dao.OrderInfoDao;
import shop.entity.OrderInfo;
import shop.util.DBUtil;

public class OrderInfoDaoImpl implements OrderInfoDao {

	@Override
	public void add(OrderInfo info) {
		String sql ="INSERT INTO `interesting_shop_db`.`t_order_info`( `order_no`, `goods_id`, `buy_num`, `amount`) VALUES (?,?,?,?)";
		Object[] params = new Object[] {info.getOrderNo(),info.getGoodsId(),info.getBuyNum(),info.getAmount()};
		DBUtil.update(sql, params);
	}

}
